<template>
  <div class="goods">
    <div class="content">
      <page-content :ContentTableConfig="ContentTableConfig" pageName="goods">
        <template #image="scope">
          <el-image
            style="width: 100px; height: 100px"
            :src="scope.row.imgUrl"
            :preview-src-list="[scope.row.imgUrl]"
          ></el-image>
        </template>
        <template #oldPrice="scope">
          {{ '￥' + scope.row.oldPrice }}
        </template>
        <template #newPrice="scope">
          {{ '￥' + scope.row.oldPrice }}
        </template>
        <template #status="scope">
          <el-tag :type="scope.row.status ? 'success' : 'danger'" size="medium">
            {{ scope.row.status ? '生效' : '失效' }}
          </el-tag>
        </template>
      </page-content>
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import PageContent from '@/components/page-content/index'
import { ContentTableConfig } from './config/content.cofig'
export default defineComponent({
  components: { PageContent },
  name: 'goods',
  setup() {
    return {
      ContentTableConfig
    }
  }
})
</script>

<style scoped lang="less">
.search {
  background-color: #fff;
  border-radius: 5px;
  margin-bottom: 20px;
}
.content {
  padding: 20px;
  background-color: #fff;
  border-radius: 5px;
}
</style>
